﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.master" AutoEventWireup="true"
    CodeFile="UserList.aspx.cs" Inherits="UserList" Theme="Main" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphSemiCASE" runat="Server">
    <table class="AnaTablo" style="width: 100%">
        <tr>
            <th class="ThBaslikRenk1">
                USER LIST
            </th>
        </tr>
        <tr>
            <td class="TdRenkSagaYasla">
                <asp:HyperLink ID="HyperlinkNewUser" runat="server" ImageUrl="~/App_Themes/Main/Images/Buttons/yenikayitbtn.jpg"></asp:HyperLink>
            </td>
        </tr>
        <tr>
            <td>
                <table style="width: 100%">
                    <tr>
                        <td>
                            <asp:Label ID="LabelRowCount" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: center">
                            <asp:GridView ID="gvUsers" runat="server" AutoGenerateColumns="False" Width="60%"
                                DataKeyNames="UserID" EmptyDataText="There is no defined user." OnRowDataBound="gvUsers_RowDataBound"
                                OnRowCommand="gvUsers_RowCommand">
                                <Columns>
                                    <asp:BoundField DataField="SiraNo" HeaderText="No" ItemStyle-CssClass="columnborder"
                                        ItemStyle-Width="3%" />
                                    <asp:BoundField DataField="UserName" HeaderText="User Name" ItemStyle-CssClass="columnborder" />
                                      <asp:BoundField DataField="Name" HeaderText="Name" ItemStyle-CssClass="columnborder" />
                                        <asp:BoundField DataField="Surname" HeaderText="Surname" ItemStyle-CssClass="columnborder" />
                                          <asp:BoundField DataField="Email" HeaderText="Email" ItemStyle-CssClass="columnborder" />
                                    <asp:BoundField DataField="IsAdmin" HeaderText="Admin" ItemStyle-CssClass="columnborder"
                                        ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" />
                                    <asp:TemplateField>
                                        <HeaderTemplate>
                                            UPDATE
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <asp:HyperLink ID="HyperLinkUpdate" runat="server" ImageUrl="~/App_Themes/Main/Images/Ikonlar/guncelle.gif"
                                                ToolTip="Update"></asp:HyperLink>
                                        </ItemTemplate>
                                        <ItemStyle HorizontalAlign="Center" CssClass="columnborder" Width="3%" />
                                    </asp:TemplateField>
                                    <asp:TemplateField>
                                        <HeaderTemplate>
                                            DELETE
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <asp:ImageButton ID="ButtonDelete" runat="server" ToolTip="Delete" ImageUrl="~/App_Themes/Main/Images/Ikonlar/kapat.gif"
                                                CommandArgument='<%# Eval("UserID") %>' CommandName="DeleteUser" OnClientClick="javascript:return confirm('User will be deleted. Are you sure?')" />
                                        </ItemTemplate>
                                        <ItemStyle Width="3%" HorizontalAlign="Center" CssClass="columnborder" />
                                    </asp:TemplateField>
                                </Columns>
                                <EmptyDataRowStyle Font-Bold="True" ForeColor="Red" />
                            </asp:GridView>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</asp:Content>
